package com.liuguangaop.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @ClassName: MvcControllerTest
 * @Description：
 * @Author: wanghr
 * Date: 5:58 PM 2020/7/13
 * Version: 1.0
 *
 */
@Slf4j
@RestController
@RequestMapping("/mvc")
public class MvcControllerTest {

    @RequestMapping(value = "/datetest",method = RequestMethod.POST)
    public void dateTest(@DateTimeFormat(iso = DateTimeFormat.ISO.DATE) Date date) {
        log.info("时间：{}",date);
    }
}
